package com.caigou.modules.center.network.api

import com.caigou.comm.base.bean.Banner
import com.caigou.comm.base.bean.HttpResult
import com.caigou.comm.base.bean.UserInfoBean
import com.caigou.modules.center.bean.*
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * @author #Suyghur.
 * Created on 2021/09/18
 */
interface HttpCenterApiService {

    @GET("/api/banner/list/5")
    fun getBanners(): Flow<HttpResult<MutableList<Banner>>>

    @GET("/api/gm/qq")
    fun getCsQQ(): Flow<HttpResult<CsQQBean>>

    @GET("/api/user/personal/info")
    fun getUserInfo(@Query("userId") userId: String): Flow<HttpResult<UserInfoBean>>

    @GET("/api/follow/my/follow")
    fun getMyFollowList(@Query("page") page: Long, @Query("limit") limit: Long, @Query("userId") userId: String): Flow<HttpResult<MyFollowBean>>

    @GET("/api/follow/my/fans")
    fun getMyFansList(@Query("page") page: Long, @Query("limit") limit: Long, @Query("userId") userId: String): Flow<HttpResult<MyFansBean>>

    @POST("/api/follow/remove/fans")
    fun removeFans(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @GET("/api/record/flower/list")
    fun getFlowerList(@Query("page") page: Long, @Query("limit") limit: Long, @Query("userId") userId: String): Flow<HttpResult<FlowerBean>>

    @GET("/api/record/rename/card/list")
    fun getRenameCardList(@Query("page") page: Long, @Query("limit") limit: Long, @Query("userId") userId: String): Flow<HttpResult<RenameCardBean>>

    @GET("/api/record/delete/card/list")
    fun getDeleteCardList(@Query("page") page: Long, @Query("limit") limit: Long, @Query("userId") userId: String): Flow<HttpResult<DeleteCardBean>>

    @GET("/api/record/free/gold/card/list")
    fun getFreeCardList(@Query("page") page: Long, @Query("limit") limit: Long, @Query("userId") userId: String): Flow<HttpResult<FreeCardBean>>

    @GET("/api/my/score/get/user/info")
    fun getMyScoreDetail(@Query("userId") userId: String): Flow<HttpResult<MyScoreDetailBean>>

    @GET("/api/my/score/detail/list")
    fun getScoreDetailList(@Query("page") page: Long, @Query("limit") limit: Long, @Query("userId") userId: String): Flow<HttpResult<ScoreDetailBean>>

    @POST("/api/activity/center/go/buy/vip")
    fun bugVip(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @GET("/api/station/message/list")
    fun getMessageList(): Flow<HttpResult<MutableList<MessageItemBean>>>

    @GET("/api/gm/message/list")
    fun getGmList(@Query("userId") userId: String): Flow<HttpResult<MutableList<MessageItemBean>>>

    @POST("/api/gm/message/send")
    fun sendGmMsg(@Body body: RequestBody, @Header("Content-type") header: String = "application/json;charset=utf-8"): Flow<HttpResult<String>>

    @GET("/api/my/feed/list")
    fun getForumDynamicList(
        @Query("feedType") feedType: Int,
        @Query("userId") userId: String,
        @Query("contentType") contentType: Int
    ): Flow<HttpResult<DynamicBean>>

    @GET("/api/my/feed/list")
    fun getInfoDynamicList(@Query("feedType") feedType: Int, @Query("userId") userId: String): Flow<HttpResult<DynamicBean>>

}

